<?
function smarty_function_LayoutHead($params, &$smarty)
{
	$html = '';	
    $head = $smarty->getTemplateVars('LayoutHead');
    $title = $smarty->getTemplateVars('LayoutTitle');
    if(is_array($head))
    {
        
    	foreach($head as $k => $v)
    	{		
    		
    		if($v[0]=='js'){
    			$html.="\t".'<script type="text/javascript" src="'.$v[1].'"></script>'."\n";
    		}elseif($v[0]=='css'){
    			$html.="\t".'<link rel="stylesheet" type="text/css" href="'.$v[1].'"/>'."\n";
    		}
    	}
    }
    
    if($title)
    {
        $html.="<title>".implode(' - ',$title)."</title>"."\n";
    }
	return $html;
}
?>